package com.ruoyi.mall.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.PmsAttributeMapper;
import com.ruoyi.mall.domain.PmsAttribute;
import com.ruoyi.mall.service.IPmsAttributeService;

/**
 * 商品属性Service业务层处理
 * 
 * @author fdk
 * @date 2023-09-17
 */
@Service
public class PmsAttributeServiceImpl implements IPmsAttributeService 
{
    @Autowired
    private PmsAttributeMapper pmsAttributeMapper;

    /**
     * 查询商品属性
     * 
     * @param id 商品属性主键
     * @return 商品属性
     */
    @Override
    public PmsAttribute selectPmsAttributeById(Long id)
    {
        return pmsAttributeMapper.selectPmsAttributeById(id);
    }

    /**
     * 查询商品属性列表
     * 
     * @param pmsAttribute 商品属性
     * @return 商品属性
     */
    @Override
    public List<PmsAttribute> selectPmsAttributeList(PmsAttribute pmsAttribute)
    {
        return pmsAttributeMapper.selectPmsAttributeList(pmsAttribute);
    }

    /**
     * 新增商品属性
     * 
     * @param pmsAttribute 商品属性
     * @return 结果
     */
    @Override
    public int insertPmsAttribute(PmsAttribute pmsAttribute)
    {
        return pmsAttributeMapper.insertPmsAttribute(pmsAttribute);
    }

    /**
     * 修改商品属性
     * 
     * @param pmsAttribute 商品属性
     * @return 结果
     */
    @Override
    public int updatePmsAttribute(PmsAttribute pmsAttribute)
    {
        return pmsAttributeMapper.updatePmsAttribute(pmsAttribute);
    }

    /**
     * 批量删除商品属性
     * 
     * @param ids 需要删除的商品属性主键
     * @return 结果
     */
    @Override
    public int deletePmsAttributeByIds(Long[] ids)
    {
        return pmsAttributeMapper.deletePmsAttributeByIds(ids);
    }

    /**
     * 删除商品属性信息
     * 
     * @param id 商品属性主键
     * @return 结果
     */
    @Override
    public int deletePmsAttributeById(Long id)
    {
        return pmsAttributeMapper.deletePmsAttributeById(id);
    }
}
